package org.shangrila.bme.eo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the bme_customer database table.
 * 
 */
@Entity
@Table(name="bme_customer")
@NamedQuery(name="BmeCustomer.findAll", query="SELECT b FROM BmeCustomer b")
public class BmeCustomer implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	private String address;

	private String city;

	private String contactor;

	private String name;

	private String phone;

	
	private String remarks;

	//bi-directional many-to-one association to BmeContract
	@OneToMany(mappedBy="bmeCustomer")
	private List<BmeContract> bmeContracts;

	//bi-directional many-to-one association to BmeSaleout
	@OneToMany(mappedBy="bmeCustomer")
	private List<BmeSaleout> bmeSaleouts;

	public BmeCustomer() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getContactor() {
		return this.contactor;
	}

	public void setContactor(String contactor) {
		this.contactor = contactor;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public List<BmeContract> getBmeContracts() {
		return this.bmeContracts;
	}

	public void setBmeContracts(List<BmeContract> bmeContracts) {
		this.bmeContracts = bmeContracts;
	}

	public BmeContract addBmeContract(BmeContract bmeContract) {
		getBmeContracts().add(bmeContract);
		bmeContract.setBmeCustomer(this);

		return bmeContract;
	}

	public BmeContract removeBmeContract(BmeContract bmeContract) {
		getBmeContracts().remove(bmeContract);
		bmeContract.setBmeCustomer(null);

		return bmeContract;
	}

	public List<BmeSaleout> getBmeSaleouts() {
		return this.bmeSaleouts;
	}

	public void setBmeSaleouts(List<BmeSaleout> bmeSaleouts) {
		this.bmeSaleouts = bmeSaleouts;
	}

	public BmeSaleout addBmeSaleout(BmeSaleout bmeSaleout) {
		getBmeSaleouts().add(bmeSaleout);
		bmeSaleout.setBmeCustomer(this);

		return bmeSaleout;
	}

	public BmeSaleout removeBmeSaleout(BmeSaleout bmeSaleout) {
		getBmeSaleouts().remove(bmeSaleout);
		bmeSaleout.setBmeCustomer(null);

		return bmeSaleout;
	}

}